<template>
  <div class="container">
    <div class="tip">热门院校</div>
    <ul class="mainstay">
      <li v-for="item in imgs" :key=item._id>
        <a href="javascript:;">
          <img :src="item.img" alt="" />
          <div>{{item.name}}</div>
        </a>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  created() {
    this.$http2({
      url:'/home/school_recommond_img',
      method:'get'
    }).then(res=>{
      this.imgs=res.data
      // console.log(this.imgs);
    })
  }
  ,
  data() {
    return {
      imgs:[]
    }
  }

}
</script>

<style lang="less" scoped>
.container{
  margin-top: 70px;
}
* {
  margin: 0;
  padding: 0;
}
.tip {
  // margin-top: 10px;
  box-sizing: border-box;
  width: 200px;
  font-family: xingkai;
  font-size: 30px;
  background-image: linear-gradient(to right, orangered, orange, gold);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.mainstay {
  // margin-top: 20px;
  width: 100%;
  // height: 420px;
  // border: 1px solid #ccc;
  display: flex;
  justify-content: space-around;
  align-content: space-around;
  flex-wrap: wrap;
  li {
    list-style: none;
    position: relative;
    width: 290px;
    height: 200px;
    border: 1px solid #ccc;
    overflow: hidden;
    // margin-top: 5px;
    a:hover img {
      // box-shadow: 5px 5px 15px rgb(129, 108, 108);
      transform: scale(1.2);
    }
    img {
      width: 100%;
      height: 100%;
      transition: all 0.7s;
    }
    div {
      position: absolute;
      width: 100%;
      height: 50px;
      bottom: 0;
      text-align: center;
      background:rgba(0, 0, 0,.5);
      font-size: 20px;
      color: #fff;
      line-height: 50px;
    }
  }
}
</style>